SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE [dbo].[usp_ShowApplyingRecordsEmployee]

	(
	@param_applicant_userID NVARCHAR(50)
	)

AS
	/* SET NOCOUNT ON */
	SELECT position,dbo.JOL_Recruitment_ApplyingRecords.id,result,JOL_Recruitment.topic,JOL_Employee.JOL_Employee_Name,JOL_Employee.JOL_Employee_School,JOL_Employee.JOL_Employee_Profession,JOL_Employee.JOL_Employee_Longevity,JOL_Employee.JOL_Employee_Mobile,JOL_Employee.JOL_Employee_Email
	 FROM dbo.JOL_Recruitment_ApplyingRecords,dbo.JOL_Recruitment_Position,dbo.JOL_Recruitment_Participants_apply,dbo.JOL_Employer,JOL_Employee,JOL_Recruitment
	WHERE
	
	 dbo.JOL_Recruitment_ApplyingRecords.recruit_position=dbo.JOL_Recruitment_Position.id AND
	 participants_apply=dbo.JOL_Recruitment_Participants_apply.id AND
	 employing_unit=JOL_Employer_No AND 
	 applicant_userID=@param_applicant_userID AND 
	  dbo.JOL_Recruitment_Participants_apply.recruitment=JOL_Recruitment.id AND 
	  dbo.JOL_Recruitment_ApplyingRecords.applicant_userID=JOL_Employee.JOL_Employee_Account

	 ORDER BY handle_time,dbo.JOL_Recruitment_ApplyingRecords.update_time,dbo.JOL_Recruitment_ApplyingRecords.add_time DESC
	 
	
	RETURN
GO
